package com.ruoyi.distrack.service.impl;


import com.ruoyi.common.core.utils.DateUtils;
import com.ruoyi.distrack.domin.dto.DisTrackQueryDTO;
import com.ruoyi.distrack.domin.entity.DisTrack;
import com.ruoyi.distrack.service.DisTrackService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.distrack.mapper.DisTrackMapper;

import javax.annotation.Resource;
import java.util.List;


/**
 * distrackService业务层处理
 * 
 * @author Larry
 * @date 2024-04-02
 */
@Service
public class DisTrackServiceImpl implements DisTrackService {


    @Resource
    private DisTrackMapper disTrackMapper;

    /**
     * 查询distrack
     * 
     * @param id distrack主键
     * @return distrack
     */
    @Override
    public DisTrack selectDisTrackById(Integer id)
    {
        return disTrackMapper.selectDisTrackById(id);
    }

    /**
     * 查询distrack列表
     * 
     * @param disTrack distrack
     * @return distrack
     */
    @Override
    public List<DisTrack> selectDisTrackList(DisTrack disTrack)
    {
        return disTrackMapper.selectDisTrackList(disTrack);
    }

    /**
     * 新增distrack
     * 
     * @param disTrack distrack
     * @return 结果
     */
    @Override
    public void insertDisTrack(DisTrack disTrack)
    {
        disTrackMapper.insertDisTrack(disTrack);
    }

    /**
     * 修改distrack
     * 
     * @param disTrack distrack
     * @return 结果
     */
    @Override
    public void updateDisTrack(DisTrack disTrack)
    {
        disTrackMapper.updateDisTrack(disTrack);
    }

    /**
     * 批量删除distrack
     * 
     * @param ids 需要删除的distrack主键
     * @return 结果
     */
    @Override
    public void deleteDisTrackByIds(Integer[] ids)
    {
        disTrackMapper.deleteDisTrackByIds(ids);
    }

    /**
     * 删除distrack信息
     * 
     * @param id distrack主键
     * @return 结果
     */
    @Override
    public void deleteDisTrackById(Integer id)
    {
        disTrackMapper.deleteDisTrackById(id);
    }

    @Override
    public List<DisTrack> proList(DisTrack disTrack) {
        disTrack.setIsNeedPropaganda(1);
        return disTrackMapper.selectDisTrackList(disTrack);
    }
}
